moved secrets handling into secrets.c