moved cast from WP calc. to record importation