commit
fixed indicies in flip()