Improvements of walk function