fixed sse gradient bug, added some plotting stuff