Adding the getchr funct.