clean up the code a smidge