The second val() call seems unneeded