add trim functions