Hamlet’s advice to Ophelia was logical