4-th assignment
In constructor lock should be made