first fully functioning iteration