functions implemented TODO comments