renamed resize to constrain