improving code added partial