changed to use jquery