set dimensions from selection