defining rest - with rest graph