trying new approach to secret key check