REF: Instead of copying functions use api method decorator.