added other support functions for spgist