level * 2.0 changed to pow(level,2.0).