move 'new' function to create_class, need debug