adds main method