changing over to api code, annoying