Added js functions for setting values