better unit testing and fixes for integer