fill in the main code