added functionality to rotate through cards