finished a first simple version of the leg detector