check nested class & inheritance