Modified to display solved message only once