Some sketchy code, we probably have to do more thinking