added ajax call, removed auto generated code