A theoretically workingish one
Should be correct but buggy