modified post insert code to call server side method