New code

Should work now, even though it’s a mess