implemented dual median return values