edited for optional attributes in height/extent query