finally got the sequence input working