implemented serializable, and added getSerialId()