refactored to do selection and texturing in series