Implement input history