Added sep-rest function.