fix api signature and test