Added cast params function to component