dropped check for width AND height, as separate checks are sufficient