removing a reliance on jquery from the api