cleaned code