Ready for Submission

Updated both the functions along with some sample execution.