Working unoptimized code.