Updated with an almost working rest class