build decorator based API