Progress. Still doesn't do the right thing though