fix complex object inputs and support dynamic inputs as well