cleaned code. fixed typos.