refactor and add getAllContact and deleteContact