Not a big deal, just want to let you know, that you can simplify the code here. Use if control for determining the item_id only, and add the prayerItem if necessary. Then the prayEntry can be moved outside the if control, so that you don't have to do it twice in each if branches.