turn method into struct