fixed constness, implemented power gradient