Updated to reflect api changes