resolved #7: missing final } for the if statement