refactor structure per earlier discussion