worked on code..but there are still lots of errors