creating controller