minor refactor
cleard code formetting error and minor refactoring in view