src: added access of dao. TODO fix bug regarding prepare failed