changing the code a bit