Function and README updated