changed to use own api