x0 trapni added and lua interface changed for c object pointers