added read and write all functions
fixing small ui bugs
fixing  bugs