[IMP] Code refactoriced