added safety features