Deleted the attach method

Deleted the attach method and combined it to the constructer