added 64 bit support
 added Q_UNUSED macro for some arguments to supress compiler warning