attempt to abstract color coding