how does compounding work in investing?