unclutter code a little