books getkeyavailable function