fixed (hopefully) guess function