removed duplicated lines, fixed typos