copied code in highlevelwalking to c++ project Gangenheten