fix bugs and populate sample cards randomly