modularizing sending code