completed creating functions