temp
adds some sqlite logic. unfinished