this is my version of the function for this forked repository.