working on database hook in: added assoc. array to index, now creating sql call