simplified mouse drawing code