added listeners and a ton of stuff