Adding leg controller part 1