added further minor modifications for the final version