implementing sequence