Added code for Class method existence