made the code a little cleaner