non-concurrent API compatible with webworkers