break up code a bit