add copyright and test return functions