script to parse kpsule_kid entities