seems wrong to manually set this, is there a more elegant way to do this?