Complete applygears.m