refactored code a little, checked for if the card has been rotated