added card reader code