updated signature and tests