Some utility tools