added listeners and changed/added some methods