adjustments to make it work in other web contexts