Altered method to get class