adding direction pointer