I'm assuming that you meant for the function to take in transformSpec as an argument.