implemented REST functions