trying to create a before filter for route