refactor directions a bit