added circular buffer code and TODO notes