moving back to pre-calculating histogram