Fixed the jquery issue and added more stuff to convert method