linting

+ remove code redundancy