fixed typos
fixed some code