final version after some changes

final version after some changes