Using associated values effectively