bug #933 - change make_key method + add some tests