updated rest functionallity