made hist script
added tests to check results