Added more functionality for JS