UC-1429 - refactor code