register constructor in front of methods