code refactoring + adapting to new spkvmd responce format