refactored to reflect model changes