added a new php helper function and added it to crafting