code working with all previous good/bad examples