completed javascript