design and ref. code