almost finished implementing core api