moved core ext to separate file