updated with the ability to run unsafely