maintenance mode works, all db functions now working.. needs comments