simplified code, changed readme