renamed tools; added flag function