added paint functionality