refactored to make nice with eclipse's import structure