use std numeric limits instead of climits