use function instead of method for rotation