added methods for trimming