Update this really rather shitty code