cleanup
refactor: remove duplicate code