added threading and new ideas are being implemented