First possibly working iteration