setup rotation
todo merge function and switch