changed name and now returns a dictonary