added xh1 specific functions in its own file