common utility for all xtools