Implement sendAll() function