made the phantom js required more general