[IMP]improve the code as per technical review