add cards lib
make card show image
refactor code