Workign with database integration