ajax reload on algorithm change