add iterator for functional queue and test