This is the main code