simplify flip() with using match.call()