ptry another optimization