Modified erasing so that it follows the specs