Put into function. STILL Need to update to longest sequential order