build the main