adding failsafes and shit