Fix for #3

silly me. I haven't use a proper class.