importing function working. Missing link to database