Added main method to model