Updated worker logic