Strip trailing spaces
Add parameter boundery check