solve sections "B" and "C"