updated source with partial comments