10 Bags of Gold Coins - Puzzle

Johny has entrusted John with 1000 Gold Coins. They are to be kept safely in 10 sealed bags. John should give Johny any number of coins on demand without opening the bags. How should the gold coins be devided and kept in sealed bags?