format fixed and debugging done