added default values in prototype methods