moved inc.functions.generic.php from premier script