added database logic (SQLContainer)