using $ to delegate events, better structure