fixed a few mistakes, thanks to Lydia