add printf support and more tests