added new classes for threading