implemented sequential patterns