was missing closing "fi" for if statement