updated Main to reflect API changes