adding more failsafes