Adding a complete reset function