added attach stuff