changing to old code