updated the core API logic