Changed to Typeclass Approach