changed rot equation to work