Modify test function for the flap