modify drawing func