modified according to the suggestions of the prof