added code card functionality