add function stroke handler