changing frequency and adding JS functionality in modal