Created a part of a function and tested

Created a part of a function and tested