was using select.attr(value) instead of select.val()