began writing assignment algorithm