add additional functions and tests