Add optimation
move inline function to here
fixed line 317
change stack