rewrote for Moose