I could see only one end which is supposly the end of the function, what about the end of the if?