creating functions done