adding typed api