version 4 with independent classes