completed class constructor