changed the code