Updated to use API