rewrite 2.41, more elegant :)