fixed the end keyword error