update put main function to class