Change API from static to instance