improve the broadcast implementation with correct order