optimal direction