lap:Code refactored