add methods and colors for logging
initialize state before first update