added some predicates and fixed the iota function