updates to make this work for front end js framework