create parent method to check inheritance