added listeners and stuff