problem two adjusted for head and tail wall