adding more functions and tests