Tested and corrected version of previous commit

read previous commit for changelog