basic approach for ex7.2