refactor sender