write router method and some routes