change map and add bias threshold of x

change map and add bias threshold
should increase speed