removed lots of null pointer errors and added score