updated with the new code
merged