changed the format and fixed a bug