added a logger, added test cases for paint.