take source from database