Added basic iterator
Better checking for free numbers - single function for all 3 scenarios