consolidated buildInitialItem code into a single function