fix return type
fix redundant code