modified for jquery rather than bootstrap
added converting value