simply the code a bit