LPS-47095 Simplify the code