#5 implemented jarl-dk's suggestion