to check for the main stage code