using rtrim is easier and more readable