added solution for counting change