write associations