attach method added to structure