added ajax call with spinner for ui