added before() to controllers