trim callbacks