a little code trimming