Added functionality for card rotation