Updated to add getText() method