added flip()