added comment denoting functions used