use int instead of forced 8-bit types where appropriate