Solved checking condition
Implemented History