used get and post instead of match for defining routes