oops, forgot to use template param instead of int