using param now for indextype instead of typeclass