moved function on 001_04_compat.lua to compat.lua