add Para class and related functions, untested