wrote preliminary methods and tests