move avgScale to core

move avgScale to core