added flip lib