xinyue, you are right.
Latching our baby exclusively whenever baby wants to and pumping (as frequently as you can when baby is not nursing) is the key to producing milk and keep the supply going!
Other than that, get plenty of rest, take good care, eat well and drink lots of water...