Add some improvements. For example make code more generic for the input
mistakes or differencies.