use dict function