Rename function
Add specs for local database