migrated keystore to map[s]i and added pow functions