log and mod funcions
log and mod funcions