updating readme and improving code