Implemented review comments by vladimir