My firt adaptation to 1.7.6. Tested. it seems to work.