removed dependence on jquery