rest method