simplify class constructor to constructor