remove needless type notation and make `flipped` func