cleaned up code
fixed typo