updated version from author plus small fix for 2.2 , 2.3 , 2.4