addedd controller fucntions