fixed bugs, added statistics and graphs