refactor to cards