added functionality to local database