add support for options hashes and blocks to canf method