now working with the revised api