changed db handling to ArrayList