made code a little cleaner