basic loop N + lots of misfeatures