added precision feature
added some tests