Fixed styling, added wrongly deleted statement and changed the return of the function