add trim support