updated readme and finalized code