add support for element as return and value type