updated paintbrush.cpp