Implement 'reset' function