WSOTWO-114: improved code