Made code for drop down reusable

WORKING