converted the methods to public and to check which of them returns null