retiming code in SGList