logic module changed to return json data