lazt cast class and lazy cast func in propper form