some refactoring, add left/right/front/back command and a square sequence