finished creating functions