May require refactoring.