changed ajax to use .done instead of success