setting  to 0 if param is not passed in