make the function for adding class
updated mini file