added loading gif
implemented agree functionality