make type conversion explicit to reduce compiler warnings