moved JSON parser to a seperate class