New trial helping older people leave hospital on time