added function and readme