I already have a function that keeps track of the coins collected but I need to fix this one as its just for reference I need the values for the other function.