combine rest and route together