Lifting degeneracies in the oscillation parameters by a neutrino factory