fixed some edge bugs. flip now working. somewhat.