added dropdown function in js file