added root direcotry variable to ajax calls