fixed rotation issues and added rotation recording