re-write main code to class