added preliminary pid controller code