got scan working but addded a bug afterwards, hand off in place between scan and control loop