add notifications and some bug fixes