small modifications in code