added code to get preliminary sensor output