implmenting changes from mariaanna