added test for empty parameter, added trim on param