made this into pure javascript, achieved partiy.  Note: it doesn't do anything