minor refactoring added static functions.php