latest changes from Lyuda notebook