adjusted step down. added secretkey output