Updated with Radko's suggestions in comments.