Added getCard function and merged changes