remove redundant code
fix formatting