Creating class not working issue resolved