added reset functionality
taking care of swp files