error handling, keep track of green/red times for calculating how wrong this is