move list function & little refactoring