Changed function name, and modified them a few