Separate thread for graph generating implementrd