writing new candidates to database fixed