added admin fuctions and a bunch of stuff