It looks like the whole function is indented too much.