before creating controller