trying to stitch database with js