moved some maximum-awesome-squared bits to local