added code for api changes (partially, still adding to it)