use limits instead of INT16_MAX for unix