Creating separate task class