Function and Submit

created the function and submitted to GitHub