change to fit the latest mainsite api