changed modal jquery functionality