LPS-41789 simplify code