used val() instead of text()