added a bit of js