Modded to new code version