added statistics to problem. spaghetti code. fix later