changed tool function struct