A device for separating a plurality of target species suspended in a biocompatible ferrofluid, the device comprising: a microfluidic channel including at least one sample inlet and at least one outlet, the microfluidic channel having a channel length extending between the at least one sample inlet and the at least one outlet, the microfluidic channel configured to receive a substantially continuous flow of a sample from the at least one sample inlet, the channel configured to flow the sample along the channel length to the at least one outlet, the sample including a plurality of target species and the biocompatible ferrofluid; and a plurality of electrodes in substantially parallel arrangement positioned proximate and substantially parallel to the microfluidic channel, the plurality of electrodes configured to generate a magnetic field pattern along at least a portion of the channel length of the microfluidic channel when a current is applied to the plurality of electrodes, the magnetic field pattern configured to cause at least two of the plurality of target species in the flow of the sample to separate when the flow of the sample travels along at least part of the microfluidic channel, characterized in that the device comprises a further electrode set positioned proximate the microfluidic channel substantially at an inlet area of the microfluidic device, said further electrode set comprising at least two electrodes configured to generate controllable magnetic forces in the sample containing the ferrofluid when controllable electrical currents are applied to the at least two electrodes, the generated controllable magnetic forces causing the at least one target species to be focused in a resultant flow having a width narrower than the input width associated with the input flow of said at least one target species. a microfluidic channel including at least one sample inlet and at least one outlet, the microfluidic channel having a channel length extending between the at least one sample inlet and the at least one outlet, the microfluidic channel configured to receive a substantially continuous flow of a sample from the at least one sample inlet, the channel configured to flow the sample along the channel length to the at least one outlet, the sample including a plurality of target species and the biocompatible ferrofluid; and a plurality of electrodes in substantially parallel arrangement positioned proximate and substantially parallel to the microfluidic channel, the plurality of electrodes configured to generate a magnetic field pattern along at least a portion of the channel length of the microfluidic channel when a current is applied to the plurality of electrodes, the magnetic field pattern configured to cause at least two of the plurality of target species in the flow of the sample to separate when the flow of the sample travels along at least part of the microfluidic channel, characterized in that the device comprises a further electrode set positioned proximate the microfluidic channel substantially at an inlet area of the microfluidic device, said further electrode set comprising at least two electrodes configured to generate controllable magnetic forces in the sample containing the ferrofluid when controllable electrical currents are applied to the at least two electrodes, the generated controllable magnetic forces causing the at least one target species to be focused in a resultant flow having a width narrower than the input width associated with the input flow of said at least one target species. <EOS>