update unison config and improve functions