refactor param constraints to be cleaner
more tests for constraints