added Math fxns and fixed SuffixArray search