library control with mongo