solved creating functions