write the first function for sequence analysis