cleaned code some more