converted to ajax almost everywhere