input sampling