more refractroing
added struct factoring