refactored and added rating to jsp for testing