fixed  wrong indentations and add a missed return