added functionality for image selector
added functionality for image selector