added functions to analyze hall data