Added flip functionality to pile view