three diff methods to construct class