remove functions.php code to own plugin