refactored to remove unnecessary controller