started implementing local database