added secret_key loading