added implementation of keystore