fixed attachment and tests