applied part of the suggestions by prof