improve keys api
improve keys api