I need to rewrite some lines to improve the code,but i have no time