continuing work on pure javascript