working function
changed name and updated readme