implement serial datatype