first modifications, added a few lines