works with JS now too