I think you want to do this in the reverse order