cast to (long) to prevent compiler warnings