TO DO : miltithreadeing