fixed minor details in the code