readded UI code in Sqlite layer