direction is know only inside the function