changed to class structure
open new class after creating class