refactoring refs #1