Updated worker script