moving utilty codes into toolbox