created extract_ims function
added a user interface