progress on measuring; refactoring