added Pythagoras, autorotation