added refdb functions