fixed typos, works semi-decently