api8- changed where some of the code sits. Still works