ready to refactor
refactored
ready to -x translate
translate direction as function pointer
top and bottom done