bin: refactor