renamed readcall to processcalldata, is now a function