adding constructors, simplifying return, changing to pointer, adding null for default argument