user and sample detection