Altered main for testing