updated to support recent localjs updates