change "int amount" into private