combining some JS interactions