Adding arm control code