Tomas refactor send api