Use reflection to pass parameters properly