Reset function implemented