adding code for celery 2