implement "heads" first version