utility modules for HSP programming