terminal find refactor