implemented data access layer