rewrote card front generation