cleaned code and better run