remove unused function
remove unused function
use promises for database calls