is valid run function