JS handling

added JS handling from node