Implement of notifications and function to store variables