Added webworker support and made the algo more interesting