complete implementation of if/boolean logic
added pipplo for max iterations