more mongo save + key generation changes