Remove stray space
Encapsulate reverse logic in flip()