implemented overloaded constructor with default parameters for only String input case