LPS-35769

Please review and test my changes. I'd also like to ask you to create some tests for the new functionality.

Thanks,
Zsolt