intelligent solution to #12