added solution for change problem