Added rest calls, system now works for sampling and evaluation