change variable name from 'tmp' to meanful ones