Updated to work on mav