BS-6865: clean code