moved core of the original