Changed JS into KO, not complete -but working