added ajax calls and changed variant identification routine to parse json