Building main method