First complete serial implementation