added c function for trimming reads based on quality