adds a main for testing