Added modal js logic