implemented threading rather than processes and closed the loop, had to deal with many mutex lock mistake and lost sun events