Coherent oscillations in a Cooper-pair box