the main runs 4 times gate usege