use openDatabase throughout
use del method, remove unused actionByKey method