using composition instead of implementation inheritance for res tracking