improved the using of the rest interface