added comments and modified functions.php