refactor and remove unused param