added the sonic function