changed to use knockoutJS