Im not proud of this - to be fixed in the future