adding traverse and implementing sequence using traverse