LD-68 Refactoring code