improved creating classes