modified to make more consistent