#1 Adding testing and logging to verify the behaviour.