rewrite perform method in photoworker