Incorporated feedback from @mikhailov