duck-typing of objects