Adding createItem method to create the item object