code refactory
API References and implementation