clean code for items printing using the card typeview