Spectroscopy of excited b and c states