Removed try
Added reset function