replaced all if/else with functions in minklass.php