add trim_size control