working on webworker implementation