swapping byall and byfrom