more work on reading cards from json, compiling and working