implements view and api connection