better rounding
add localStorage support