Add support for dict input