move the ultrasound init function to main