converted to using jquery
merged