Handling the fund function