generator for functions fixed

generating not only for class names ending with "_SERVICE"