added functionality for image selector