min and max values

@mpociot It also works fine with negative values, so this PR would also close #7 (at least for android)