added script for building 3d histogram