moved fns to Tools instead