debugging flip method