js stuff to suit the new schema