adding in checkusermedia code