
981 P.2d 627 (1998)
The PEOPLE of the State of Colorado, Plaintiff-Appellee,
v.
Sharon Celia HANNA, Defendant-Appellant.
No. 97CA1076.
Colorado Court of Appeals, Div. IV.
October 15, 1998.
Rehearing Denied November 13, 1998.
Certiorari Denied August 16, 1999.[*]
*628 Gale A. Norton, Attorney General, Martha Phillips Allbright, Chief Deputy Attorney General, Richard A. Westfall, Solicitor General, Peter J. Cannici, Assistant Attorney General, Denver, for Plaintiff-Appellee.
David F. Vela, Colorado State Public Defender, Douglas D. Barnes, Deputy State Public Defender, Denver, for Defendant-Appellant.
Opinion by Judge ROY.
Defendant, Sharon Celia Hanna, appeals a judgment of conviction entered on a jury verdict finding her guilty of first degree criminal trespass. We affirm.
The complaining witness and her brother occupied a residence owned by the brother. The complaining witness testified that one night when her brother was away she was awakened at 2:00 a.m. by the sound of someone yelling and pounding on the front door of the house. She looked out the window and recognized defendant, who had previously been involved in a relationship with her brother.
According to the complaining witness, she did not want defendant to come in and, therefore, did not answer the door, did not acknowledge to defendant that she was home, and made sure all of the entrances were locked. Eventually defendant went to the attached garage, opened the exterior garage door, and attempted to gain entry into the house through a back door. When her initial attempts to gain entry through the back door were unsuccessful, defendant took a saw and attempted to saw her way through the door. At that juncture, the complaining witness called the police.
The complaining witness testified that her brother had previously advised her that defendant should be allowed entry into the house if she came to the door and rang the bell. She stated, however, that defendant did not have a key to the house.
The brother testified for the defense and stated that defendant did have permission to enter the garage because she was storing personal property there. In rebuttal, the prosecutor called the investigating officer who testified that, when he interviewed him, the brother had denied that defendant had permission to be inside the garage on the night of the incident.
Defendant was originally charged with, and tried for, first degree criminal trespass, criminal mischief, and misdemeanor theft. However, the latter two charges were dismissed by the court upon defendant's motion for judgment of acquittal.

I.
Defendant contends the court erred in denying her motion for judgment of acquittal with respect to the charge of first degree criminal trespass because the prosecutor failed to present sufficient evidence to establish *629 each element of the charge. We disagree.
A trial court must apply the substantial evidence test to determine whether a motion for judgment of acquittal should be granted. Under that test, the court must decide whether the relevant evidence, both direct and circumstantial, when viewed as a whole and in the light most favorable to the prosecution, is substantial and sufficient to support a conclusion by a reasonable person that a defendant is guilty of the crime charged beyond a reasonable doubt. People v. Paiva, 765 P.2d 581 (Colo.1988).
The determination of credibility of witnesses and the weight to be given conflicting items of evidence rests with the fact-finder. People v. Quick, 713 P.2d 1282 (Colo. 1986). Further, because contradictory and incomplete testimony is not uncommon, inconsistencies within testimony and contradictions between witnesses do not, by themselves, justify a judgment of acquittal when there is legally sufficient remaining evidence to support a finding of guilt. People v. Brassfield, 652 P.2d 588 (Colo.1982).

A.
As is pertinent here, a person commits the crime of first degree criminal trespass when that person knowingly and unlawfully enters or remains in a dwelling belonging to another. Section 18-4-502, C.R.S.1998. For purposes of this statute, a dwelling is defined as "a building which is used, intended to be used, or usually used by a person for habitation." Section 18-1-901(3)(g), C.R.S.1998.
For purposes of resolving a preliminary issue, we note that in People v. Jiminez, 651 P.2d 395 (Colo.1982), our supreme court concluded that for the purposes of the second degree burglary statute, the definition of dwelling encompasses the entire residential structure including an attached garage. We conclude that the Jiminez rationale is equally applicable to first degree criminal trespass and, thus, that the definition of "dwelling" as contained in §18-1-901(1), C.R.S.1998, applies to both the first degree criminal trespass statute and the second degree burglary statute.
Accordingly, we reject defendant's argument that there was no trespass because she did not enter the house.

B.
Defendant's principal contention is that the entry was authorized because she had been allowed access to the house in the past and was not verbally refused entry on the night of this incident. Defendant argues that in order to prove there was a trespass, the prosecution had to show that the complaining witness verbally revoked that previous permission. We are not persuaded.
There was evidence that defendant did not reside at, or have a key to, the residence. On those occasions when she had previously entered the house she came as a guest, not as an occupant. She necessarily knew, therefore, that her access to the house and the attached garage was contingent upon someone being home to let her inside. Accordingly, although based on prior visits she may have had an expectation that she would be welcome, she had no such assurance that this would occur on every occasion.
Further, there is no evidence in the record that defendant definitely knew that someone was home on the night she tried to gain entry. Hence, even if we assume defendant had some right to expect access to the house whenever she rang the bell and someone was at home, there was no evidence to establish a reasonable expectation of access to the house on the night this incident occurred. Although the brother testified that defendant was authorized to be in the garage, this testimony was called into question, if not rebutted, by the detective who investigated this case. See People v. Quick, supra. The argument that there had not been a revocation of her right to enter is, therefore, not persuasive.
Based on this record, we conclude that there was sufficient evidence to establish the crime of first degree criminal trespass. Hence, the trial court did not err in denying defendant's motion for a judgment of acquittal.


*630 II.
Defendant also contends the court erred in excluding a portion of defense counsel's cross-examination of a detective who had investigated the facts of this case. Again, we disagree.
In order to refute the testimony of the brother, the investigating officer was called to testify that when he interviewed the brother he was specifically told that defendant did not have permission to be in the garage on the night of this incident. During cross-examination, the investigating officer acknowledged that he had recommended that defendant be charged with second degree burglary rather than first degree criminal trespass.
Defense counsel then asked whether second degree burglary was a more serious charge. The trial court, sua sponte, did not permit the witness to answer.
The right of a defendant to confront and cross-examine adverse witnesses is the principal means by which the credibility of the witness and the truthfulness of the testimony can be tested. Davis v. Alaska, 415 U.S. 308, 94 S.Ct. 1105, 39 L.Ed.2d 347 (1974). The exposure of a witness' motivation and bias in testifying is an important function of the right to confront witnesses. Kogan v. People, 756 P.2d 945 (Colo.1988).
However, the right to confront and cross-examine witnesses is not absolute. People v. Thurman, 787 P.2d 646 (Colo.1990). The trial court must exercise its discretion to preclude inquiries that have no probative value, are irrelevant, or are prejudicial. People v. Taylor, 190 Colo. 210, 545 P.2d 703 (1976). We conclude that the trial court did not abuse its discretion in this regard.
The judgment is affirmed.
Judge NEY and Judge KAPELKE concur.
NOTES
[*]  Justice SCOTT does not participate.
