cleaning code a little bit