binhex function in separate file