created wrapper for API