ref handler