added notifications and refactored a bit