fix bug: sqrt() maybe not correct!