Finished my personal functions added in my comments.