exit added after unsuccesful