modified error messages when given incorrect parameters