abstracted constructor into init method