used a hackish way of decoding json for now