modifications to the code