would it make sense to move this to the attachment class?