added 3d direction