Add Functions and tests