move to pure js implementation for worker import