draw tool functionality