added cardfactory and started working on a test